﻿#ifndef THREAD_H
#define THREAD_H
#include <QThread>
#include <functional>
class Thread : public QThread
{
    Q_OBJECT
public:
    //explicit Thread(QObject* parent = 0);
    Thread(std::function<int()>func, QObject* parent = 0);
protected:
    virtual void run() override;
signals:
    void ret(int val);
private:
    std::function<int()> m_func;
};
#endif 
